<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./lib/template-web.js"></script>
    <script src="./lib/jquery.js"></script>
  </head>
  <body>
    <div id="box">
      <p>姓名:</p>
      <p>年龄:</p>
      <p>性别:</p>
    </div>
    <script type="text/html" id="star">
      <p>姓名:{{name}}</p>
      <p>年龄:{{age}}</p>
      <p>性别:{{sex}}</p>
    </script>
    <script>
      let data = { name: "张三", age: "20", sex: "男" };
      let htmlts = template('star',data)
      $('#box').html(htmlts)
    </script>
  </body>
</html>
